package com.bishe.demo.modules.ticket.controller;

import com.bishe.demo.modules.ticket.entity.Seating;
import com.bishe.demo.modules.ticket.service.SeatingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description SeatingController
 * @Author YHQ
 * @Date 2021/4/1 13:31
 */
@RestController
@RequestMapping("/api")
public class SeatingController {
    @Autowired
    private SeatingService seatingService;
    @GetMapping("/seatingId/{seatingName}")
    Integer getSeatingIdBySeatingName(@PathVariable String seatingName){
        return seatingService.getSeatingIdBySeatingName(seatingName);
    }
    @GetMapping("/seatings")
    Seating getSeating(){
        return seatingService.getSeating();
    }
}
